﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CodeCamp.BL.Model.SessionDetail>>" %>

<%@ Register TagName="Speakers" TagPrefix="CC" Src="~/Views/Session/SessionSpeakers.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	List
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>
		List</h2>
	<div class="session-list">
		<% Model.BindTo(SessionList); %>
		<asp:DataList runat="server" ID="SessionList">
			<ItemTemplate>
				<div class="session-list-session">
					<a name='<%# Eval("Session.SessionID") %>'>
						<%# Eval("Session.SessionID","<!--{0}-->") %></a>
					<div class="session-title">
						<a href='<%#Eval("Session.SessionID","/Session/Details/{0}")%>'>
							<%# Eval("Session.Name")%></a>
					</div>
					<div class="session-tags"><%# Html.Partial("SessionTags", Eval("Session.Tags"))%></div></div>
					<div class="session-excerpt">
						<%# Eval("Session.Excerpt")%>
						<a href='<%#Eval("Session.SessionID","/Session/Details/{0}")%>'>more...</a>
					</div>
					<asp:LoginView runat="server">
						<LoggedInTemplate>
							<%# Html.Partial("SessionEditLink", Eval("Session"))%>
						</LoggedInTemplate>
					</asp:LoginView>
					<div class="session-interest">
						Interest:<%# Eval("Interest")%> <a href='<%#Eval("Session.SessionID","/Session/AddInterest/{0}")%>'>
							Count me in!</a></div>
					<div class="session-speakers">
						<%#  Html.Partial("SessionSpeakers", Eval("Session.Speakers"))%></div>
					<div class="session-materials">
						<%# Html.Partial("SessionDownloads", Eval("Session.Attachments"))%></div>
					<div class="session-segments">
					<%# Eval("Session.SegmentCount")%> Segment(s)
					</div>
				</div>
			</ItemTemplate>
		</asp:DataList>
	</div>
	<p>
		<%= Html.ActionLink("Add a session", "Add") %>
	</p>
</asp:Content>
